<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>过渡效果作业一下拉菜单</title>
    <style>
    *{margin: 0;
    padding: 0;
    }
    li{
        list-style: none;
    }
    .menu>li{
        float: left;
        border: 1px solid red;
        background-color: red;
        height: 22px;
    }
    .sub_menu>li{
        height: 0;
        overflow: hidden;
        background-color: black;
        transition: height 3s;
        color: #fff;
    }
    .menu>li:hover >.sub_menu >li{
        height: 30px;
    }
    </style>
</head>
<body>
    <ul class="menu">
        <li>手游
            <ul class="sub_menu">
                <li>阴阳师</li>
                <li>阿尔托</li>
                <li>最强蜗牛</li>
            </ul>
        </li>
        <li>端游
            <ul class="sub_menu">
                <li>守望先锋</li>
                <li>巫师3:狂猎</li>
                <li>饥荒</li>
            </ul>
        </li>
        <li>页游
            <ul class="sub_menu">
                <li>赛尔号</li>
                <li>龙斗士</li>
                <li>造梦西游</li>
            </ul>
        </li>
    </ul>
</body>
</html>